/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


import javax.microedition.lcdui.ChoiceGroup;

/**
 * @author Zhanet
 */
public class Answers {

      public static final int ANSWERS_COUNT = 3;
      private String text;
      private String[] answers;
      private int correctAnswer;


   public Answers(String initText, String[] initAnswers, int initCorrectAnswer){
        this.text = initText;
        this.answers = initAnswers;
        this.correctAnswer = initCorrectAnswer;
   }


   public String getText(){
        return this.text;
   }


   public String[] getAnswers(){
        return this.answers;
   }


   public int getCorrectAnswer(){
        return this.correctAnswer;
   }

   public ChoiceGroup toChoiceGroup(){
        ChoiceGroup choiceGroup = new ChoiceGroup(text, ChoiceGroup.EXCLUSIVE, answers, null);
            return choiceGroup;
   }
}
